package cn.gov.anhai.service;

import cn.gov.anhai.mappers.HomeMapper;
import cn.gov.anhai.utils.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 首页
 */
@Service
public class HomeService {
    @Resource
    HomeMapper homeMapper;

    /**
     * 轮播图
     */
    public ApiResult<Object> bannerList() {
        List<Map<String, Object>> list = homeMapper.bannerList();
        return ApiResult.ok(list);
    }

    /**
     * 导航区
     */
    public ApiResult<Object> navList() {
        List<Map<String, Object>> list = homeMapper.navList();
        return ApiResult.ok(list);
    }

    /**
     * 景点推荐
     */
    public ApiResult<Object> scenicList() {
        List<Map<String, Object>> list = homeMapper.scenicList();
        return ApiResult.ok(list);
    }

    /**
     * 路线推荐
     */
    public ApiResult<Object> wayList() {
        List<Map<String, Object>> list = homeMapper.wayList();
        return ApiResult.ok(list);
    }

    /**
     * 美食推荐
     */
    public ApiResult<Object> delicacyFoodList() {
        List<Map<String, Object>> list = homeMapper.delicacyFoodList();
        return ApiResult.ok(list);
    }

    /**
     * 酒店推荐
     */
    public ApiResult<Object> hotelList() {
        List<Map<String, Object>> list = homeMapper.hotelList();
        return ApiResult.ok(list);
    }
}
